package Thread;

public class MyThread{
    public static void main(String[] args) {
        myThreadOne one = new myThreadOne();
        myThreadTwo two = new myThreadTwo();
        one.start();
        two.start();
    }
    
}
class myThreadOne extends Thread{
    public  void run(){
        for (int i = 0; i < 100; i++) {
            if (i%2==0)
                System.out.println(Thread.currentThread().getName()+":"+i);
        }
    }
}
class myThreadTwo extends Thread{
    public  void run(){
        for (int i = 0; i < 100; i++) {
            if (i%2!=0)
                System.out.println(Thread.currentThread().getName()+":"+i);
        }
    }
}